package com.ruoyi.chiwen.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.chiwen.mapper.TbStagingMapper;
import com.ruoyi.chiwen.domain.TbStaging;
import com.ruoyi.chiwen.service.ITbStagingService;

/**
 * 应还金额Service业务层处理
 * 
 * @author chiwen
 * @date 2021-06-14
 */
@Service
public class TbStagingServiceImpl implements ITbStagingService 
{
    @Autowired
    private TbStagingMapper tbStagingMapper;

    /**
     * 查询应还金额
     * 
     * @param tId 应还金额ID
     * @return 应还金额
     */
    @Override
    public TbStaging selectTbStagingById(Long tId)
    {
        return tbStagingMapper.selectTbStagingById(tId);
    }

    /**
     * 查询应还金额列表
     * 
     * @param tbStaging 应还金额
     * @return 应还金额
     */
    @Override
    public List<TbStaging> selectTbStagingList(TbStaging tbStaging)
    {
        return tbStagingMapper.selectTbStagingList(tbStaging);
    }

    /**
     * 新增应还金额
     * 
     * @param tbStaging 应还金额
     * @return 结果
     */
    @Override
    public int insertTbStaging(TbStaging tbStaging)
    {
        return tbStagingMapper.insertTbStaging(tbStaging);
    }

    /**
     * 修改应还金额
     * 
     * @param tbStaging 应还金额
     * @return 结果
     */
    @Override
    public int updateTbStaging(TbStaging tbStaging)
    {
        tbStaging.setUpdateTime(DateUtils.getNowDate());
        return tbStagingMapper.updateTbStaging(tbStaging);
    }

    /**
     * 批量删除应还金额
     * 
     * @param tIds 需要删除的应还金额ID
     * @return 结果
     */
    @Override
    public int deleteTbStagingByIds(Long[] tIds)
    {
        return tbStagingMapper.deleteTbStagingByIds(tIds);
    }

    /**
     * 删除应还金额信息
     * 
     * @param tId 应还金额ID
     * @return 结果
     */
    @Override
    public int deleteTbStagingById(Long tId)
    {
        return tbStagingMapper.deleteTbStagingById(tId);
    }
}
